package cn.jbolt.ec.sysconfig;

import cn.jbolt._admin.permission.CheckPermission;
import cn.jbolt._admin.permission.PermissionKey;
import cn.jbolt.base.JBoltBaseController;
import com.jfinal.aop.Inject;

@CheckPermission(PermissionKey.SYSCONFIG_ADMIN)
public class EcSysconfigAuthController extends JBoltBaseController {

    @Inject
    SysconfigService sysconfigService;

    public void index(){
        keepPara();
        set("pageData",sysconfigService.get_sysconfig_page(getPageNumber(),getPageSize(),getKeywords()));
        render("index.html");
    }


    public void toggle_off_on_sysconfig(){
        renderJson(sysconfigService.toggle_off_on_sysconfig(getInt(0)));
    }

}
